-- GENERATED SPELL FOR [Cauldron Lord Razarch] --


function spell0_11076(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17173,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_11076', 5000, 1)
end

function spell1_11076(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11076', 3000, 1)
end

function spell2_11076(pUnit, Event) --@Summon Skeleton,Self--
pUnit:FullCastSpellOnTarget(17204,pUnit)
pUnit:RegisterEvent('Sorts_11076', 2000, 1)
end

function Sorts_11076(pUnit, Event)
local choix_sorts_11076 = math.random(0, 2)
if choix_sorts_11076 == 0 then
pUnit:RegisterEvent('spell0_11076', 1, 1)
end
if choix_sorts_11076 == 1 then
pUnit:RegisterEvent('spell1_11076', 1, 1)
end
if choix_sorts_11076 == 2 then
pUnit:RegisterEvent('spell2_11076', 1, 1)
end
end

function mob11076_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11076', math.random(1500, 3000), 1)
end

function mob11076_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11076_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11076_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11076, 1, 'mob11076_Action')
RegisterUnitEvent(11076, 2, 'mob11076_Leave')
RegisterUnitEvent(11076, 3, 'mob11076_Kill')
RegisterUnitEvent(11076, 4, 'mob11076_Die')
